<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>even.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script type="text/javascript">
		function mclick(){
			var e= event.srcElement;
			var bd=e.parentNode;
			bd.removeChild(e);
		}
		window.onload=function(){
			//获取所有的p
			var parray=document.getElementsByTagName("p");
			for(var i=0;i<parray.length;i++){
				//给p绑定事件
				if(parray[i].addEventListener){
					parray[i].addEventListener("click",mclick);
				}else{
					parray[i].attachEvent("onclick",mclick);
				}
			}
		}
	</script>
	
  </head>
  
  <body>
    <p >如果你点我,我就消失</p>
    <p >继续点我</p>
    <p >接着点我</p>
  </body>
</html>
